﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.Data
{
    [DataContract]
    public class RequestHeader
    {
        /// <summary>
        /// 用户标识
        /// </summary>
        [DataMember]
        public string UserIdentity { get; set; }

        /// <summary>
        /// 控制域编号
        /// </summary>
        [DataMember]
        public string DomainId { get; set; }

        /// <summary>
        /// 发送时长
        /// </summary>
        [DataMember]
        public long SendTicks { get; set; }

        /// <summary>
        /// 场景编码
        /// </summary>
        [DataMember]
        public byte Scenario { get; set; }

        /// <summary>
        /// 指令编码
        /// </summary>
        [DataMember]
        public byte Command { get; set; }

        /// <summary>
        /// 数据长度
        /// </summary>
        [DataMember]
        public long DataLength { get; set; }

        /// <summary>
        /// 模式编码
        /// 0x01:self
        /// 0x02:ALL
        /// 0x03:Other
        /// </summary>
        [DataMember]
        public byte Mode { get; set; }

        /// <summary>
        /// 当客户端向主服务器和备用服务器都发送数据时，这个是这一批数据的标识
        /// </summary>
        [DataMember]
        public Guid UniqueKey { get; set; }

        /// <summary>
        /// 预期将受到的response数量
        /// </summary>
        [DataMember]
        public int ExpectantResponseCount { get; set; }

        /// <summary>
        /// 请求发送时，可以使用的服务器地址， 此数量应该和ExpectantResponseCount一致
        /// </summary>
        [DataMember]
        public string[] ServerAddress { get; set; }
    }
}
